#ifndef ADAPTER_H
#define ADAPTER_H
#include"target.h"
#include"adatee.h"
#ifndef SAFE_DELETE
#define SAFE_DELETE(p) { if(p){delete(p); (p)=nullptr;} }
#endif
//单继承 包含对象  组合
class PowerAdapter:public IRussiaSocket{

public:

    PowerAdapter():m_pCharger(new OwnChrger()){}
    ~PowerAdapter()override{SAFE_DELETE(m_pCharger);}
    void Charge()override{
        m_pCharger->ChargeWithFeetFlat();
    }

private:
    OwnChrger *m_pCharger;

};

#endif // ADAPTER_H
